post_install() {
    #replacing config files
    \cp -r /etc/swagarch-config-system/. /

    systemctl enable lightdm.service
    echo "lightdm.service is enabled"

    chmod +x /etc/systemd/scripts/reflector.sh

    systemctl enable reflector.service
    echo "reflector.service is enabled"
    
    systemctl enable bluetooth.service
    echo "bluetooth.service is enabled"

    systemctl enable ntpd.service
    echo "ntpd.service is enabled"

    systemctl enable tlp.service
    systemctl enable tlp-sleep.service
    echo "Linux Advanced Power Management is enabled"

    systemctl enable fstrim.timer
    echo "Periodic TRIM Timer is enabled"
}

post_upgrade() {
    post_install $1
}

pre_remove() {
    systemctl disable reflector.service
    echo "reflector.service is disabled"

    systemctl disable lightdm.service
    echo "lightdm.service is disabled"

    systemctl disable tlp.service
    systemctl disable tlp-sleep.service
    echo "Linux Advanced Power Management is disabled"

    systemctl disable fstrim.timer
    echo "Periodic TRIM Timer is disabled"
}
